package com.wxm.jwt.exception;
/**
 * <p>
 *      Jwt共通异常
 * </p>
 * @author: wxm
 * @Date: 2021/10/6
 */
public class JWTException extends RuntimeException{
    private Integer code;

    private JWTException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public static void error(String msg){
       throw new JWTException(500, msg);
    }

    public static void error(Integer code,String msg){
       throw new JWTException(code, msg);
    }
}
